package Math;

public class test1 {
    public static void main(String[] args) {
        //需求：统计水仙花数的个数
        int count=0;
        for (int i = 1000; i < 10000; i++) {
            double sum=0;
            int t=i;
            while(t!=0){
                int d=t%10;
                sum+=Math.pow(d,4);
                t/=10;
            }
            if(sum==i){
                System.out.println(i);
                count++;
            }
        }
        System.out.println(count);
    }
}
